﻿Public Class listadosRecursosProyectos

    Private Sub listadosRecursosProyectos_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: esta línea de código carga datos en la tabla 'DataSet2.PROJECT_RESOURCE' Puede moverla o quitarla según sea necesario.
        GenericAdministrator.loadComboBox(Me.cboProyecto, ProjectAdministrator.search(), "id", "name")
        GenericAdministrator.loadComboBox(Me.cboRecurso, ResourceAdministrator.search("id, (surname || ', ' || firstname) as name"), "id", "name")
       
        Me.ReportViewer1.RefreshReport()
    End Sub

    Private Sub btnMostrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMostrar.Click
        Dim projectId As Integer = Me.cboProyecto.SelectedValue
        Dim resourceId As Integer = Me.cboRecurso.SelectedValue

        Me.PROJECT_RESOURCETableAdapter.Fill(Me.DataSet2.PROJECT_RESOURCE, resourceId, projectId)

        Me.ReportViewer1.RefreshReport()

    End Sub
End Class